Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid endless spinner when no readme is provided #6590

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

antgamdia
Copy link
Contributor

Description of the change

When packages don't have any readme file, currently the spinner is never hidden. It gives the impression of something still unloaded, so the user should remain in that page because sth else will be displayed soon.
However, this is not true: once ! isFetching, if there is no readme... it will never be available.

This PR passes the isFetching prop downstream so that the readme renderer can decide what to display.

Benefits

No more endless spinner when no readme is provided.

Possible drawbacks

N/A

Applicable issues

N/A

Additional information

image

Signed-off-by: Antonio Gamez Diaz <[email protected]>
@netlify
Copy link

netlify bot commented Aug 8, 2023

Deploy Preview for kubeapps-dev canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 86ce2ce
🔍 Latest deploy log https://app.netlify.com/sites/kubeapps-dev/deploys/64d24fca057a4e0008b55ae3

Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks Antonio.

One thing that I was trying to do while doing the recent removal of conatiners, is to actually remove the passing down of state props from our components (except where it makes sense for simple components that aren't using state per-se). In the past, the container would get the state and pass all the props down through the chain to the endpoints. You'll see in the PackageView component that you modified here that it doesn't have any props, it just selects the required state. Anyway, point was not to change this, just be aware than where you think it makes sense, we can do so.

@antgamdia
Copy link
Contributor Author

One thing that I was trying to do while doing the recent removal of conatiners, is to actually remove the passing down of state props from our components (except where it makes sense for simple components that aren't using state per-se).

Ah, great to know. Thanks for the context here; I'll take it into account for future components

@antgamdia antgamdia merged commit 1473e94 into vmware-tanzu:main Aug 9, 2023
38 checks passed
@antgamdia antgamdia deleted the add-noreadme-msg branch August 9, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants